docs(check-type-source-resolution): name the paths precondition and the maintainer-only closure at the point of refusal - #16257
Merged
baozhoutao merged 3 commits intoSep 6, 2026
Conversation
… the closure at the point of refusal The refusal names `paths` first. That remedy has a precondition it never stated: the consuming program's `rootDir` has to contain the dependency's source. Where it does not, tsc admits the dep's file graph and then reports TS6059 for all of it, billed to the consuming package's test-typecheck ledger — the PR #12570 shape, reached from the `paths` limb instead of the re-baseline one. Both the ledger and `rootDir` are maintainer-only, so at that point the author has no self-serve remedy and the message named none. The knowledge was already in this file — the header's with-`paths` red and the PR #12570 reading over the registry — and nowhere in the text an author reads. Written as a CONDITION, never a blanket closure: `paths` stays correct wherever the program's `rootDir` does contain the source, and a message overstating the closure would be worse than the current silence. The refusing sentence, the ⛔ SHRINK-ONLY testimony and the ONBOARDED exception are untouched, so `check-ratchet-remedy-authority` still classifies this gate as `refused`. Two self-test pins added for the new halves and the battery floor raised 10 -> 12 to match. Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8 Co-authored-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…s-guidance Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8 Co-authored-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… TS6059 leg Measured on this branch rather than carried over from the filing: the runtime test program goes 191 -> 204 errors under the `paths` remedy, +13, all TS6059 in `packages/services/service-realtime/src/**`, no new code error. Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8 Co-authored-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Sep 6, 2026
baozhoutao
marked this pull request as ready for review
September 6, 2026 08:35
baozhoutao
enabled auto-merge
September 6, 2026 08:35
baozhoutao
deleted the
claude/issue-16000-type-source-resolution-paths-guidance
branch
September 6, 2026 09:16
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16000
check-type-source-resolutionnamespathsas its first remedy when a registeredpackage acquires a NEW dist-resolved type import. That remedy has a precondition the
message never stated: the consuming program's
rootDirhas to contain thedependency's source. Where it does not, the author walks into a second wall that
nothing at the point of refusal mentioned — and past that wall every remaining route
is maintainer-only, so the message recommended a path and then named no remaining
self-serve option.
The knowledge was already in this file the whole time — its header records the
with-
pathsred at:27-28, and the registry doc-block states thatpathsis"additionally the WRONG tool, measured on PR #12570". None of it was in the text an
author actually reads. The #15978 round paid a full cycle discovering it.
Message only. The verdict is untouched, per the card and its triage: what the gate
judges, the shrink-only registry and every
tsconfig*.jsonin the repo are unchanged.The card's hard precondition: the
pathsleg, re-measured hereThe card asks for the closure to be reproduced before it is written into a message
("A message that overstates the closure would be worse than the current silence").
Reproduced on this branch, on the same pair and through the same program —
@objectstack/runtimereaching@objectstack/service-realtimeviatsconfig.test.json, with this gate's own remedy applied topackages/runtime/tsconfig.jsonand one new cross-packageimport type:packages/runtime/tsconfig.test.jsonpathsremedy+13, all of them TS6059, and not one new code error — every other diagnostic
code's count is identical across the two legs (TS18048 x91, TS18046 x27, TS2339 x17,
TS2493 x15, TS2345 x10, TS6133 x6, TS2322 x6 … unchanged). All 13 name
packages/services/service-realtime/src/**, billed intopackages/runtime'stest-typecheck ledger, which
service-realtimecannot see. That confirms the card'smeasured 13 exactly, and the 191 baseline matches the count
tsconfig.test.json's ownheader records for this program.
The mutation was proven to land on disk before either reading (grep counts on both
touched files plus
git hash-object), and restoration was proven byte-identicalagainst the HEAD blob hashes with a scoped
git diff HEADof 0 bytes. Nothing fromthe reproduction is committed.
What changed, and what deliberately did not
Added to the refusal's remedy paragraph, after the existing re-baseline limb: the
pathsprecondition, the TS6059-into-the-ledger outcome it produces when theprecondition fails, and the remaining option stated plainly — do not take the
dependency (reach the subject through in-package source), or escalate, because the
ledger and
rootDirare both maintainer-only.Written as a CONDITION, never as a blanket closure.
pathsstays the correct remedywherever the consuming program's
rootDirdoes contain the source; a messageoverstating the closure would turn an author away from a route that is open, which is
worse than today's silence.
Three literals were kept intact because they are a cross-gate contract:
widening the registry entry is not the fix(the PREDICATION shapecheck-ratchet-remedy-authorityclassifies this file asrefusedfrom), theSHRINK-ONLYtestimony, and theONBOARDEDexception. The new sentences are addedaround them, never in place of them, and the two new negations are bound to their
verbs ("Never widen that ledger", "never widen a
rootDir") so every offer thismessage makes is still refused.
check:ratchet-remedy-authorityconfirms it: 6 gatesstill turn the expanding remedy down outright, unchanged.
Two self-test pins added, in the existing
the registry, audited in BOTH directionsbattery — one that the failure text names TS6059, one that it names the
maintainer-only closure. They fail independently because the halves fail
independently. That battery's floor is raised 10 to 12 to match, never loosened.
Gates
All 31 commands derived by
node scripts/pm/dispatch-gates.mjs --changed --commands --repo objectstack-ai/objectstackon the merged tree, reconciled with--ran.Every one exit 0, exit codes captured before any pipe. The load-bearing verdict lines:
check-type-source-resolution --self-test OKcheck-type-source-resolution OK — 125 tsc program(s) across 78 packages scanned … 61 registered(the production verdict, unchanged by this diff)OK check-ratchet-remedy-authority: 213 scripts swept … 6 turn it down outrightcheck-nul-bytes: OK (scanned 7959 text file(s) … no raw ASCII control bytes)No publish surface, so
skip-changesetis applied. #16215 remains open and isunrelated to this diff.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
Generated by Claude Code